//
//  ShopCell.m
//  陶瓷
//
//  Created by 郭天龙 on 15/7/12.
//  Copyright (c) 2015年 王戈. All rights reserved.
//

#import "ShopCell.h"
#import "UIImageView+WebCache.h"
#import "TCBaseTool.h"

@interface ShopCell ()

@property (nonatomic, weak) IBOutlet UIImageView *titleImage;
@property (nonatomic, weak) IBOutlet UILabel     *label1;
@property (nonatomic, weak) IBOutlet UILabel     *label2;
@property (nonatomic, weak) IBOutlet UILabel     *label3;
@property (nonatomic, weak) IBOutlet UILabel     *time;

@end

@implementation ShopCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

- (void)setModel:(NSDictionary *)dic
{
    NSString *uri = [dic objectForKey:@"Img1"];
    [self.titleImage sd_setImageWithURL:[NSURL URLWithString:uri] placeholderImage:nil];
    
    self.label1.text = [dic objectForKey:@"Title"];
    self.label2.text = [NSString stringWithFormat:@"%@-%@-%@",[dic objectForKey:@"Address"],[dic objectForKey:@"Type"],[dic objectForKey:@"Histroy"] ];
    self.label3.text = [dic objectForKey:@"Price"];
    
    self.time.text = [TCBaseTool calculateTime:[dic objectForKey:@"CreateTime"]];
}

@end

